import React, { Component } from 'react'
// 导入子组件
import Son from './Son'
export default class Father extends Component {
    state = {
        count: 100
    }
    render() {
        return (
            <div>
                <p>我是父组件</p>
                <p> <button onClick={() => {
                    this.setState({
                        count: this.state.count + 1
                    })
                }}>count++</button></p>
                {/* 使用子组件 */}
                <Son count={this.state.count}></Son>
            </div>
        )
    }
}
